from sqlalchemy import create_engine
from sqlalchemy.orm import sessionmaker, Session

from utils import get_env


def gen_session() -> Session:
    URL = get_env("database.uri")
    engine = create_engine(url=URL)
    Session = sessionmaker(bind=engine)
    return Session()
